<template>
	<view class="page"> 
		<uni-search-bar radius="20"  placeholder="输入关键字" @cancel="$emit('cancel')" cancelButton="always" 	> </uni-search-bar>
		<view class="between"  v-show="list.length > 1">
			<text class="flex1">搜索历史</text>
			<view class="flex" @click="list=[]">
				<u-icon name="trash" color="#787B86" size="20"></u-icon>
				<text style="margin-left: 10rpx;" >清空</text>
			</view> 
		</view>
		<view class="container">
			<view class="h-item" v-for="(e,i) in list" :key="i" :item="item">
				{{ item.name }}
			</view>
		</view>
		<view class="between">
			<text>猜你喜欢</text>
			<text>
				<u-icon name="reload" color="#787B86" size="20"></u-icon>
			</text>
		</view>
		<view class="container cc">
			<item class="item" v-for="(e,i) in list" :key="i" :item="item"> </item>
		</view>
		
	</view>
</template>
<script>
	import item from './core/item.vue'
	export default {
		components:{
			item
		},
		props:{
			
		},
	}
</script>
<style lang="scss" scoped>
	.page{
		padding: 20px;
		.cc{
			justify-content: center;
		}
		.h-item{
			background: #F4F4F7;
			border-radius: 34rpx 34rpx 34rpx 34rpx;
			margin:5px 5px;
			padding: 5PX 20px;
		}
		.between{
			font-size: 30rpx;
			font-family: PingFangSC-Regular-, PingFangSC-Regular;
			font-weight: normal;
			color: #787B86;
		}
	}
</style>